package android.longs.study.user.servlet;

import java.io.IOException;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import android.longs.study.base.HomeServlet;
import android.longs.study.user.service.UserServiceImple;

@WebServlet("/user/login")
public class LoginServlet extends HomeServlet{

    private UserServiceImple service = new UserServiceImple();
    @Override
    public void doRequestFunction(HttpServletRequest request,
	    HttpServletResponse response) {

	try {
	    System.out.println("登录");
	    String loginFunction = service.loginFunction(request);
	    System.out.println(loginFunction);
	    response.getWriter().write(loginFunction);
	} catch (Exception e) {
	    // TODO: handle exception
	    System.out.println("登录异常 "+e.getMessage());
	}

    }



}
